extends Area2D


func _ready():
	pass

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	#$AnimatedSprite2D.play("Idle")
	pass


func _on_body_entered(body):
	if body.name == "Player":
		Game.Gold += 5
		var tween = get_tree().create_tween()
		var tween2 = get_tree().create_tween()
		tween.tween_property(self,"position",position - Vector2(0,20),0.35)
		tween2.tween_property(self,"modulate:a",0,0.3)
		tween.tween_callback(queue_free)


